<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    // 构造函数Date的方法
    // var date = new Date();
    // console.log(date*1);


    // Date.now() 获取当前时间对应的毫秒数
    // var ms = Date.now();
    // console.log(ms);

    // Date.parse() 传入一个字符串格式的日期/日期对象 =>返回对应的毫秒数
    var ms = Date.parse("2021-12-31");
    console.log(ms);




</script>
</html>